<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
    * {
      box-sizing: border-box;
    }
    body {
      padding: 100px;
    }
    .container {
      width: 500px; height: 500px;position: relative;display: flex;overflow: hidden;
      // border: 2px solid #000;
    }
    .scroll {
      display: flex;
      flex-direction: column;
      width: 500px;
      height: 500px;
      overflow: scroll;
    }
    .editor {
      border: 1px dashed blue; display: inline-block; position: relative;
    }
    .top {
      position: sticky;
      top: 0;
      height: 20px;
      margin-left: 20px;
      width: calc(100% - 20px);
      background: red;
    }
    .left {
      position: sticky;
      left: 0;
      height: 100%;
      width: 20px;
      min-width: 20px;
      background: red;
    }
  </style>
</head>
<body>

<div class="container">
  <div class="scroll">
    <div style="display: flex;flex-direction: column;align-self: flex-start;">
      <div class="top">fds、afds、afds、afds、afd、a</div>
      <div style="display: flex; align-self: flex-start">
        <div class="left"></div>
        <div class="editor">
          <div style="width: 1000px;height: 1000px; border: 1px solid yellow;padding: 20px;">
            <div style="position: absolute; height: 100%;left: 0;"></div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<script>
  const data = {
    a: {
      b: 'fffff'
    }
  }


  console.log(eval(`(data, f) => data.a.b = f`)(data, 'vvvv'))
  console.log(data)
</script>
</body>
</html>